<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<style>
body {
	margin: 10;
	font-size: 62.5%;
	line-height: 1.5;
}

.blue-button {
	background: #25A6E1;
	padding: 3px 20px;
	color: #fff;
	font-size: 10px;
	border-radius: 2px;
	-moz-border-radius: 2px;
	-webkit-border-radius: 4px;
	border: 1px solid #1A87B9
}

table {
	width: 80%;
}

th {
	background: SteelBlue;
	color: white;
}

td, th {
	border: 1px solid gray;
	font-size: 12px;
	text-align: left;
	padding: 5px 10px;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	max-width: 200px;
	white-space: nowrap;
	text-overflow: ellipsis;
	text-overflow: ellipsis;
}
</style>
</head>
<title>00fly功能演示-Thymeleaf</title>
<script>
function openwin(port){
   window.open(window.location.protocol + "//" + window.location.hostname + ":" + port);
}
</script>
<body>
	<center>
	 <table align="center">
			<tr>
				<th colspan="4">Navigate</th>
			</tr>
			<tr>
				<td><a href="/" target="_blank">index</a></td>
				<td><a href="/show" target="_self">show</a></td>
				<td><a href="/404" target="_self">出错页面</a></td>
				<td><a href="/doc.html" target="_blank">doc.html</a></td>
			</tr>
		</table>
	<h3>Docker List</h3>
	<th:block th:each="map:${map}">
			<table>
			 <tr>
			   <th colspan="6" th:text="|Docker服务器 ${map.key}|"></th>
				</tr>
				<tr>
				<th width="5">序号</th>
				<th width="50">id</th>
				<th width="50">name</th>
				<th width="50">state</th>
				<th width="50">status</th>
				<th width="50">ports</th>
			</tr>
			<th:block th:each="it,stat:${map.value}">
				<tr>
					<td th:text="${stat.count}"/>
					<td th:text="${#strings.substring(it.id,0,12)}"></td>
					<td th:text="${it.names}"></td>
					<td th:text="${it.state}"></td>
					<td th:text="${it.status}"></td>
					<td>
					 <a th:text="${it.ports[0].publicPort}" href="javascript:void(0);" th:onclick="|openwin(${it.ports[0].publicPort})|"></a>
				    </td>
				</tr>
			</th:block>
		</table>
	</th:block>
	</center>
</body>
</html>
